查单接口
请求参数 | 类型 | 描述 |
---|---|---|
out_trade_no | string | 商户订单号 |
query | object | 声明请求的查询参数 |
sp_mchid | string | 服务商商户号 |
sub_mchid | string | 子商户商户号 |
business_product_id | string | 平台产品ID2 | 11 枚举值之一 |
php
$instance->v3->offlineface->transactions->outTradeNo->_out_trade_no_->getAsync([
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sp_mchid' => '198798777',
'sub_mchid' => '3233122121',
'business_product_id' => '2',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/offlineface/transactions/out-trade-no/{out_trade_no}')->getAsync([
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sp_mchid' => '198798777',
'sub_mchid' => '3233122121',
'business_product_id' => '2',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/offlineface/transactions/out-trade-no/{out_trade_no}']->getAsync([
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sp_mchid' => '198798777',
'sub_mchid' => '3233122121',
'business_product_id' => '2',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->offlineface->transactions->outTradeNo->_out_trade_no_->get([
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sp_mchid' => '198798777',
'sub_mchid' => '3233122121',
'business_product_id' => '2',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/offlineface/transactions/out-trade-no/{out_trade_no}')->get([
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sp_mchid' => '198798777',
'sub_mchid' => '3233122121',
'business_product_id' => '2',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/offlineface/transactions/out-trade-no/{out_trade_no}']->get([
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sp_mchid' => '198798777',
'sub_mchid' => '3233122121',
'business_product_id' => '2',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sp_appid | string | 服务商公众号appid |
sp_mchid | string | 服务商商户号 |
sub_appid | string | 子商户公众号appid |
sub_mchid | string | 子商户商户号 |
payer | object | 支付用户信息 |
sp_openid | string | 公众下的openid |
sub_openid | string | 子公众下的openid |
amount | object | 金额信息 |
total | integer | 总金额 |
currency | string | 货币类型CNY 枚举值 |
promotion_detail | object[] | 优惠信息 |
scene_info | object | 支付场景信息 |
device_ip | string | 设备IP |
bank_type | string | 付款银行 |
trade_type | string | 交易类型NATIVE | JSAPI | APP | MWEB | AUTH 枚举值之一 |
trade_state | string | 交易状态 |
trade_state_description | string | 交易描述 |
debt_state | string | 欠款状态 |
description | string | 商品信息 |
attach | string | 商户附加信息 |
success_time | string | 支付成功时间 |
transaction_id | string | 微信订单号 |
repayment_transaction_id | string | 还款微信订单号 |
out_trade_no | string | 商户订单号 |
error_type | string | 错误分类 |
参阅 官方文档